Now Available!

Native .Net
Components

TList WinForms
for
.Net Framework

&

MetaDraw WinForms
for
.Net Framework



Bennet-Tec
Components
Make you
look sharp!



Home

Company

Products

Order Forms

How To

Downloads

Updates

Support

Registration

Dependencies

Links

Compatibility

Site Map


Basic How To


How To Implement Headers and Footers

It is easy to implement headers and footers in ALLText, and ALLText can read most header/footer tags that are created in MS Word.

View On-Line Sample
Return to main How To Page

Adding Header and Footer Support

ALLText 4 supports the definition of Headers and Footers to be stored with the document. Headers and footers may be defined for the document as a whole, for even pages, for odd pages, or for the first page.

To create a Header or footer set the appropriate HeaderFText or FooterFText property, Note that these are list properties.

Thus :

HeaderFText (0) - specifies a header for the document as a whole.
HeaderFText (1) - specifies a header for even pages.
HeaderFText (2) - specifies a header for odd pages.
HeaderFText (3) - specifies a header for the first page.

These properties actually hold the Formatted text string corresponding to the header or footer. If you read in an RTF file with headers or footers, the headers and footers will NOT be shown in ALLText, but will be interpreted and stored by the HeaderFText and FooterFText properties. You can if you wish then add this text to secondary ALLText boxes.

For Example:

Sub Command5_Click ()

ALLText1.DataType = 63 'Read all rtf formatting codes
ALLText1.FileName = App.Path & "\SomeFileName.RTF"
ALLText1.FileLoad = 1 'ATX_IO_FAST
For i = 0 To ALLText1.FontTableSize - 1 'copy font table to secondary controls
ret_code = FontTableGet (ALLText1, I,......)
ret_code = FontTablePut (ALLText2, I,......)
ret_code = FontTablePut (ALLText3, I,......)
Next I
If Len(ALLText1.HeaderFText(0)) > 0 Then
ALLText2.FText = ALLText1.HeaderFText(0)
End If
If Len(ALLText1.FooterFText(0)) > 0 Then
ALLText3.FText = ALLText1.FooterFText(0)
End If

End Sub


Copyright© 2003 Bennet-Tec Information Systems, Inc. All rights reserved.